package com.zheng.damo01.作业;

import java.lang.ref.SoftReference;
import java.util.Arrays;

public class Test05 {
    public static void main(String[] args) {
        String[] strArr={"bca","dadfa","dddaaa","你好呀","我来了","你在干什么了"};
        System.out.println("元字符串数组");
        System.out.println(Arrays.toString(strArr));
        int count=0;
        for (int i = 0; i < strArr.length; i++) {
            if (strArr[i].length()>5){
                count++;
                for (int j = i; j < strArr.length; j++) {
                    if (j==strArr.length-1){
                        strArr[j]="";
                    }else {
                        strArr[j]=strArr[j+1];
                    }

                }
            }
        }
        System.out.println("删除后");
        System.out.println(Arrays.toString(strArr));


    }
}
